﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Sale_Model;
using Sale_Common;
using Sale_DAL;
namespace Sale_Operation
{
    public class AnalysisOp : Component
    {
        public override bool Save(object obj)
        {
            throw new NotImplementedException();
        }
        public override bool HasExists(object obj)
        {
            throw new NotImplementedException();
        }

        public override bool Delete(object obj)
        {
            throw new NotImplementedException();
        }

        public override DataTable GetList(string strCondition, int iCurrentPageIndex, ref int iRecordCount)
        {
            throw new NotImplementedException();
        }

        public override object GetModel(object obj)
        {
            throw new NotImplementedException();
        }
        public DataTable GetList(int iType, string strStartTime, string strEndTime)
        {
   
            db = new DataBase();
            try
            {
                SqlHelper.FillDataset(db.Connection, "SP_GetProfit ", db.Data, new string[] { "dtList" }, new object[] { iType, strStartTime, strEndTime });
            }
            catch (Exception ex)
            {
                LinkService.InsertLog(ESysLogType.Error, "利润统计分析出错！[" + ex.ToString() + "]", EMenuList.利润分析);
            }
            db.Close();
            return db.Data.Tables[0];
        }

    }
}
